package huanzhao.erp.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
@TableName(value ="staff")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Staff implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "create_time")
    private Date createTime;


    @TableField(value = "last_modified")
    private Date lastModified;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 权限列表
     */
    @TableField(value = "permission")
    private String permission;

    /**
     * 是否在休假
     */
    @TableField(value = "vacating")
    private Boolean vacating;

    /**
     * 是否已离职
     */
    @TableField(value = "resigned")
    private Boolean resigned;

    /**
     * 是否为采购员
     */
    @TableField(value = "purchaser")
    private Boolean purchaser;

    /**
     * 是否为库管员
     */
    @TableField(value = "warehouser")
    private Boolean warehouser;

    /**
     * 是否为维修员
     */
    @TableField(value = "maintainer")
    private Boolean maintainer;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Staff(String name, String phone) {
        this.name = name;
        this.phone = phone;
    }
}